#include <iostream>
// #include "TcpServer.hpp"

#include <memory>
#include "HttpServer.hpp"

void Usage(std::string proc)
{
  std::cout << "Usage\r\n" << proc << " port[1024+]" << std::endl;
}

int main(int argc, char* argv[])
{
  if(argc != 2)
  {
    Usage(argv[0]);
    exit(4);
  }
  int port = atoi(argv[1]);
  
  std::shared_ptr<HttpServer> http_server(new HttpServer(port));
  http_server->InitHttpServer();
  http_server->Loop();

  for(;;)
  {}
  return 0;
}
